/**
 * Copyright 2008-2009. Chongqing Communications Industry Services Co.,Ltd Information Technology Branch. All rights
 * reserved. <a>http://www.cqcis.com</a>
 */
package com.cqcis.uip.base.framework.handlers;

import com.cqcis.uip.base.framework.common.Role;
import com.cqcis.uip.base.framework.common.Task;
import com.cqcis.uip.base.framework.core.ServiceRole;

/**
 * telnet协议客户端, 抽象定义
 * 
 * @author huangmy
 * @date   2008-8-10
 */
@ServiceRole(Role.TELNET_CLIENT)
public interface TelnetClientService {
	/**
	 * 发送字符行, 返回的字符串在逻辑上为一行或者多行
	 * 
	 * @param task
	 * @return
	 * @throws Exception
	 */
	public String doTextlineSend(Task task) throws Exception;
	
	/**
	 * 接收到字符行, 所调用的方法处理; 接收到的字符行以'\n'结束(可能为多行)
	 * 
	 * @param textline
	 * @param task
	 * @return 
	 * @throws Exception
	 */
	public void doTextlineReceived(String textline, Task task) throws Exception;
}
